package pkg

var mapMsg = map[int]string{
	Success:             "请求成功",
	InternalServerError: "服务器错误",
	InvalidParams:       "参数错误",
	Forbidden:           "禁止访问",
	HttpPostRepEmpty:    "无响应",
	HttpPostOutErr:      "请求外部资源接口失败",

	RegistrationFailed:  "注册失败",
	RegistrationSuccess: "注册成功",
	UserNoExistent:      "该账号不存在",
	PasswordErr:         "密码错误",
	LoginSuccess:        "登录成功",
	NotLogin:            "请登录后再试",
}

func Code2msg(code int) string {
	msg, ok := mapMsg[code]
	if !ok {
		return mapMsg[InternalServerError]
	}
	return msg
}
